<div class="block_in_wrapper">
<h2>{#addproject#}</h2>
<p>{#obligatory_fields#}</p>

	<form novalidate class="main" method="post" action="admin.php?action=addpro" {literal}onsubmit="return validateCompleteForm(this);"{/literal} >
	<fieldset>
		<div class="row"><label for="name">{#name#}: <span style="color:#f00;">*</span></label><input type="text" class="text" name="name" id="name" required="1" realname="{#name#}" /></div>
		<div class="row"><label for="desc">{#description#}:</label><div class="editor"><textarea name="desc" id="desc"  rows="3" cols="1" ></textarea></div></div>

	    <div class="clear_both_b"></div>

		<div class="row">
			<label for="end">{#due#}:</label>
			{* regexp="{literal}\d{2}.\d{2}.\d{4}{/literal}" *}
			<input type="text" class="text" name="end"  id="end" realname="{#due#}" />
		</div>
		
		<div class="row">
			<label for="neverdue"></label>
			<label for="neverdue" id="neverduelabel">{#neverdue#}</label>
			<input type="checkbox" class="checkbox" value="neverdue" name="neverdue" id="neverdue" />
		</div>
		
		<div class="datepick">
			<div id = "add_project" class="picker" style = "display:none;"></div>
		</div>

		<script type="text/javascript">
		  	theCal = new calendar({$theM},{$theY});
			theCal.dayNames = ["{#monday#}","{#tuesday#}","{#wednesday#}","{#thursday#}","{#friday#}","{#saturday#}","{#sunday#}"];
			theCal.monthNames = ["{#january#}","{#february#}","{#march#}","{#april#}","{#may#}","{#june#}","{#july#}","{#august#}","{#september#}","{#october#}","{#november#}","{#december#}"];
			theCal.relateTo = "end";
			theCal.dateFormat = "{$settings.dateformat}";
			theCal.getDatepicker("add_project");
		</script>

		<div class = "row">
		<label for = "budget">{#budget#}:</label>
		<input type = "text" class="text" name = "budget" id = "budget" />
		</div>
		
		<div class="row">
			<label class="no-pointer">{#members#}:</label>
			<div class="users-in-form">
				{foreach key=u item=user from=$users}
				<div class="user-in-form">
					{if $user.coord == '1'}<input type="hidden" name="assignto[]" value="{$user.ID}" />{/if}
					<input type="checkbox" class="checkbox" value="{$user.ID}" name="assignto[]" id="{$user.ID}"  {if $user.ID == $userid} checked="checked"{/if} {if $user.coord == '1'} checked="checked" disabled {/if} />
					<label for="{$user.ID}">
						{$user.name} @
						<span class="user-company">{$user.company}</span> 
						{if $user.coord == '1'} <span class="notice-alert">({#coord_label#})</span> {/if}
					</label>
					<div class="clearfix"></div>
				</div>
				{/foreach}
			</div>
			<div class="clearfix"></div>
		</div>
		
		<input type="hidden" name="assignme" value="1" />

	    <div class="clear_both_b"></div>

		<div class="row-butn-bottom">
		<label>&nbsp;</label>
		<button type="submit" onfocus="this.blur();">{#addbutton#}</button>
		{if $myprojects == "1"}
		<button type = "reset" onclick="blindtoggle('form_addmyproject');toggleClass('add_myprojects','add-active','add');toggleClass('add_butn_myprojects','butn_link_active','butn_link');toggleClass('sm_myprojects','smooth','nosmooth');return false;" onfocus="this.blur();">{#cancel#}</button>
		{else}
		<button type = "reset" onclick="blindtoggle('form_{$myprojects[project].ID}');return false;">{#cancel#}</button>
		{/if}
		</div>


	</fieldset>
	</form>

</div> {*block_in_wrapper end*}